package org.fhm.zdte.common.service.channel;

import org.fhm.substrate.annotation.Setup;
import org.fhm.zdte.common.standard.IChannelDispatcher;
import org.fhm.zdte.common.standard.IChannelManager;

import java.util.Map;

/**
 * The abstract layer of {@link IChannelDispatcher}.
 *
 * @author 谭波
 * @since 2024/4/7
 */
public abstract class AbstractChannelDispatcher implements IChannelDispatcher {

    @Setup
    protected Map<String, IChannelManager> iChannelManagerMap;

    @Override
    public void closeAllChannelManager() {
        iChannelManagerMap.values().forEach(IChannelManager::closeChannel);
    }
}
